﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.IO;

namespace DicomScu.Scu
{
    public class Util
    {
        private static string _startdir;
        public static string GetStartDirectory()
        {
            if (_startdir == null)
            {
                _startdir = Process.GetCurrentProcess().StartInfo.WorkingDirectory;
                if (String.IsNullOrEmpty(_startdir))
                {
                    _startdir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
                    _startdir = _startdir.Substring(6);
                }
            }
            return _startdir;
        }
    }
}
